><

Using Element actions to edit HTML code



In addition to simply finding HTML tags, Element lets you manipulate HTML elements in a variety of ways using the Element action pop-up menu in the middle Action section:

Keep Element keeps the element and sets, updates, or deletes its attribute.

Rename Element renames the element, but keeps the element's contents. You can keep the element's attributes or change them with an Attribute action.

Delete Element deletes the element completely, including its start and end tags as well as its contents.

Replace Element by its Content deletes only the element's start and end tags, leaving its content untouched.

Delete Content Only deletes only the content of the element, leaving its start and end tags in place.

To modify an existing HTML code element:

1 Define the search criteria and scope of the search as described in Searching for HTML code.

2 Choose Keep Element from the Element Action pop-up menu.

3 Click New Action to create an Attribute action.

4 Select set, update, or delete from the Attribute action pop-up menu.

  • The Set option sets the specified attribute and value for the HTML element whether or not the attribute already exists.
  • The Update option only updates the attribute if it already exists in the specified HTML element. It does not add the attribute.
  • The Delete option removes the attribute and its value wherever it appears.

  • 5 Enter the attribute in the Attribute text box or choose an attribute from the context-sensitive pop-up menu to the right of the text box. (The pop-up menu displays only attributes relevant to the HTML element selected in the Search section of Element.)

    6 Enter the attribute's value in the Value text box or select a value from the context-sensitive pop-up menu to the right of the text box.

    7 Click Start to begin the search and carry out the specified action.

    Element lets you create multiple Attribute actions to be performed during a Keep Element action. Click New Action and follow the steps outlined here before you click Start. Element performs each Attribute action defined in the Action section. You can remove an Attribute action by selecting it in the list and clicking Delete Action.

    To rename an existing HTML code element:

    1 Define the search criteria and scope of the search as described in Searching for HTML code.

    2 Choose Rename Element from the Element Action pop-up menu.

    3 Enter a new element name in the text box that appears below the Element action pop-up menu.

    4 Click Start to begin the search and carry out any specified actions.

    You can create Attribute actions to a Rename Element action, if desired.

    To delete an existing HTML code element:

    1 Define the search criteria and scope of the search as described in Searching for HTML code.

    2 Choose Delete Element from the Element Action pop-up menu.

    3 Click Start to begin the search and carry out the specified action.

    To replace an existing HTML code element with its content:

    1 Define the search criteria and scope of the search as described in Searching for HTML code.

    2 Choose Replace Element by its Content from the Element Action pop-up menu.

    3 Click Start to begin the search and carry out the specified action.

    To delete the content of an existing HTML code element:

    1 Define the search criteria and scope of the search as described in Searching for HTML code.

    2 Choose Delete Content Only from the Element Action pop-up menu.

    3 Click Start to begin the search and carry out the specified action.


    Searching > Finding HTML code elements > Using Element actions to edit HTML code